home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume6 / pacman.p.h < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  5.5 KB

  1. Subject: v06i018:  missing files from Apollo pacman (pacman.p.h)
  2. Newsgroups: mod.sources
  3. Approved: rs@mirror.UUCP
  4.  
  5. Submitted by: cca!decvax!decwrl!imagen!geof (Geof Cooper)
  6. Mod.sources: Volume 6, Issue 18
  7. Archive-name: pacman.p.h
  8.  
  9. Sorry, this was my first attempt at automatically creating a shell archive
  10. from the makefile, and I forgot to add the include files.  Here are the
  11. missing files.  Please update the mod.sources distribution.
  12.     - Geof
  13.  
  14. #!/bin/sh
  15. # This is a shell archive.  Remove anything before this line,
  16. # then unpack it by saving it in a file and typing "sh file".
  17. # Contents:  board.ins.pas fig.ins.pas
  18.  
  19. echo x - board.ins.pas
  20. sed 's/^XX//' > "board.ins.pas" <<'@//E*O*F board.ins.pas//'
  21.  
  22. XX{ **** INSERT FILE FOR PACMAN_BOARD MODULE **** }
  23. XX{ Written January, 1985 by Geoffrey Cooper                                  }
  24. XX{ Copyright (C) 1985, IMAGEN Corporation                                    }
  25. XX{ This software may be duplicated in part of in whole so long as [1] this   }
  26. XX{ notice is preserved in the copy, and [2] no financial gain is derived     }
  27. XX{ from the copy.  Copies of this software other than as restricted above    }
  28. XX{ may be made only with the consent of the author.                          }
  29.  
  30. XXTYPE
  31. XX    board_$direction = 0..num_orientations-1;
  32. XX    board_$elt = (wall, ecor, dcor, scor);
  33.  
  34. XXPROCEDURE board_$init(screen: gpr_$bitmap_desc_t;
  35. XX                      screen_size: gpr_$offset_t;
  36. XX                      pacs: integer); EXTERN;
  37.  
  38. XXPROCEDURE board_$reinit; EXTERN;
  39.  
  40. XXPROCEDURE board_$get_num_dots(OUT dots, sdots: Integer); EXTERN;
  41.  
  42. XXPROCEDURE board_$draw_board; EXTERN;
  43.  
  44. XXPROCEDURE board_$try_pac_position(IN OUT pos: gpr_$position_t); EXTERN;
  45.  
  46. XXPROCEDURE board_$can_turn(IN OUT pos: gpr_$position_t;
  47. XX                          IN     new_dir: board_$direction;
  48. XX                          OUT    turn: boolean); EXTERN;
  49.  
  50. XXPROCEDURE board_$clear_dot(pos: gpr_$position_t; 
  51. XX                           OUT wasdot, special: boolean); EXTERN;
  52.  
  53.  
  54. XXPROCEDURE board_$show_score(newscore, newnumpacs: integer); extern;
  55.  
  56. @//E*O*F board.ins.pas//
  57. chmod u=rw,g=rw,o=rw board.ins.pas
  58.  
  59. echo x - fig.ins.pas
  60. sed 's/^XX//' > "fig.ins.pas" <<'@//E*O*F fig.ins.pas//'
  61. XX{ ******************************************************** }
  62. XX{ ******************************************************** }
  63. XX{ *********                                      ********* }
  64. XX{ *********    FIG.INS.PAS                       ********* }
  65. XX{ *********                                      ********* }
  66. XX{ *********    Insert file for MOBILE_FIGURE     ********* }
  67. XX{ *********    Module.                           ********* }
  68. XX{ *********                                      ********* }
  69. XX{ *********    Written 12/24/84 by Geof Cooper   ********* }
  70. XX{ *********                                      ********* }
  71. XX{ ******************************************************** }
  72. XX{ ******************************************************** }
  73. XX{ Copyright (C) 1984, 1985, IMAGEN Corporation                              }
  74. XX{ This software may be duplicated in part of in whole so long as [1] this   }
  75. XX{ notice is preserved in the copy, and [2] no financial gain is derived     }
  76. XX{ from the copy.  Copies of this software other than as restricted above    }
  77. XX{ may be made only with the consent of the author.                          }
  78. XX                                                  
  79. XXCONST
  80. XX    num_orientations = 4;   { number of orientations of figure }
  81. XX    guage = 16;
  82.  
  83. XX    { orientations: set up so orientation*360/num_or. = angle }
  84. XX    or$right         = 0;
  85. XX    or$up            = 1;
  86. XX    or$left          = 2;
  87. XX    or$down          = 3;
  88.  
  89. XXTYPE
  90. XX    fig_$orientations = array[0..num_orientations-1] of gpr_$bitmap_desc_t;
  91. XX    fig_$rep = RECORD
  92. XX                { bitmaps describing figure in all orientations }
  93. XX                figures     : fig_$orientations;
  94.  
  95. XX                { position on screen }
  96. XX                position    : gpr_$position_t;
  97.  
  98. XX                { orientation selects one of above }
  99. XX                orientation : 0..num_orientations-1;
  100. XX    
  101. XX                { velocity in direction of orientation, in pixels/unit time }
  102. XX                velocity    : PInteger;
  103. XX              END;
  104. XX    fig_$t = ^fig_$rep;
  105.  
  106. XXPROCEDURE fig_$alloc_fig_bitmaps( OUT f: fig_$orientations ); EXTERN;
  107.  
  108. XXPROCEDURE fig_$create( IN figures: fig_$orientations;
  109. XX                       IN pos_x, pos_y: Integer;
  110. XX                       OUT r: fig_$t ); EXTERN;
  111.  
  112. XXPROCEDURE fig_$refresh( IN r: fig_$t ); EXTERN;
  113.  
  114. XXPROCEDURE fig_$move( IN r: fig_$t;
  115. XX                     IN pos: gpr_$position_t ); EXTERN;
  116. XX{ ASSUMES that raster op is XOR }
  117.  
  118.  
  119. XXPROCEDURE fig_$elapse_time( IN r: fig_$t;
  120. XX                            IN t: PInteger;
  121. XX                            OUT newpos: gpr_$position_t ); EXTERN;
  122.  
  123. XXPROCEDURE fig_$turn( IN r: fig_$t; IN orient: PInteger ); EXTERN;
  124.  
  125. XXPROCEDURE fig_$set_velocity( IN r: fig_$t;
  126. XX                             IN velocity: PInteger ); EXTERN;
  127.  
  128. XXFUNCTION fig_$coincident( IN r1, r2: fig_$t ): BOOLEAN;
  129. XX    EXTERN;
  130. @//E*O*F fig.ins.pas//
  131. chmod u=rw,g=rw,o=rw fig.ins.pas
  132.  
  133. echo Inspecting for damage in transit...
  134. temp=/tmp/sharin$$; dtemp=/tmp/sharout$$
  135. trap "rm -f $temp $dtemp; exit" 0 1 2 3 15
  136. cat > $temp <<\!!!
  137.       35     143    1333 board.ins.pas
  138.       69     299    2803 fig.ins.pas
  139.      104     442    4136 total
  140. !!!
  141. wc  board.ins.pas fig.ins.pas | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp
  142. if test -s $dtemp
  143. then echo "Ouch [diff of wc output]:" ; cat $dtemp
  144. else echo "No problems found."
  145. fi
  146. exit 0
  147.